-
Notifications
You must be signed in to change notification settings - Fork 353
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reuse the connection attempts count logic for PQ PSK negotiation #6295
Reuse the connection attempts count logic for PQ PSK negotiation #6295
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 12 of 12 files at r1, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @buggmagnet)
ios/PacketTunnelCore/Actor/PacketTunnelActor+Public.swift
line 41 at r1 (raw file):
- Parameter nextRelay: next relay to connect to. */ public nonisolated func reconnect(to nextRelay: NextRelay, reconnectReason: ActorReconnectReason = .userInitiated) {
Implicitly "hiding" state related data (with possibly high impact) like this could end up resulting in unexpected behavior in the future.
ios/PacketTunnelCore/Actor/PacketTunnelActorCommand.swift
line 22 at r1 (raw file):
/// Reconnect tunnel. case reconnect(NextRelay, reason: ActorReconnectReason = .userInitiated)
Implicitly "hiding" state related data (with possibly high impact) like this could end up resulting in unexpected behavior in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @rablador)
ios/PacketTunnelCore/Actor/PacketTunnelActor+Public.swift
line 41 at r1 (raw file):
Previously, rablador (Jon Petersson) wrote…
Implicitly "hiding" state related data (with possibly high impact) like this could end up resulting in unexpected behavior in the future.
I'm not sure what you mean by that, this is the same code, except that .userInitiated
is one abstraction layer above than it used to be now.
Can you clarify what you mean by "hiding state related data" ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @buggmagnet)
ios/PacketTunnelCore/Actor/PacketTunnelActor+Public.swift
line 41 at r1 (raw file):
Previously, buggmagnet wrote…
I'm not sure what you mean by that, this is the same code, except that
.userInitiated
is one abstraction layer above than it used to be now.Can you clarify what you mean by "hiding state related data" ?
Yeah, I realised afterwards that this was already part of the current impl. What I mean is that defaulting to a state might be risky since this function can be used without realising you're supplying .userInitiated
as reconnect reason. By making the param required you will always choose the correct reason, thus preventing possible bugs.
ebedeb4
to
66336ae
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 8 of 12 files reviewed, 2 unresolved discussions (waiting on @rablador)
ios/PacketTunnelCore/Actor/PacketTunnelActor+Public.swift
line 41 at r1 (raw file):
Previously, rablador (Jon Petersson) wrote…
Yeah, I realised afterwards that this was already part of the current impl. What I mean is that defaulting to a state might be risky since this function can be used without realising you're supplying
.userInitiated
as reconnect reason. By making the param required you will always choose the correct reason, thus preventing possible bugs.
Fair enough, I've made it explicit !
ios/PacketTunnelCore/Actor/PacketTunnelActorCommand.swift
line 22 at r1 (raw file):
Previously, rablador (Jon Petersson) wrote…
Implicitly "hiding" state related data (with possibly high impact) like this could end up resulting in unexpected behavior in the future.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 4 of 4 files at r2, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved
🚨 End to end tests failed. Please check the failed workflow run. |
This PR does the following things :
ReconnectReason
toActorReconnectReason
and move it to the public interfaceconnectionLoss
reasonThis change is